package com.xbongbong.paas.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

/**
 * 角色数据权限修改接口DTO
 * @author kaka
 * @date 2019/3/15 13:49
 * @since v1.0
 * @version v1.0
 */
@Getter
@Setter
@ToString
public class RoleDataPermissionEditDTO extends BaseDTO {

    private static final long serialVersionUID = 7209875003722918870L;

    /**
     * 需修改数据权限的角色id
     */
    @NotNull(message = "{dto.msg.roleDataPermissionEdit.roleId.NotNull}")
    private Integer roleId;

    /**
     * 数据权限，见{@link com.xbongbong.sys.enums.DataPermissionEnum#code}
     */
    @NotNull(message = "{dto.msg.roleDataPermissionEdit.dataPermission.NotNull}")
    @Range(min = 1,max = 5,message = "{dto.msg.roleDataPermissionEdit.dataPermission.Range}")
    private Integer dataPermission;
}
